import { HttpModule, Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PluginAliyunMonitorController } from './plugin-aliyun-monitor.controller';
import PluginAliyunMonitorTaskService from './plugin-aliyun-monitor-task.service';
import { Server } from '../../server/server.entity';
import { PluginAliyunSetting } from './plugin-aliyun-setting.entity';
import { PluginAliyunSLB } from './plugin-aliyun-slb.entity';
import { PluginAliyunMonitorSLB_QPS } from './plugin-aliyun-monitor-slb-qps.entity';
import { PluginAliyunPolardb } from './plugin-aliyun-polardb.entity';
import { PluginAliyunPolardbController } from './plugin-aliyun-polardb.controller';
import { PluginAliyunSettingController } from './plugin-aliyun-setting.controller';
import { PluginAliyunMonitorPolardbMetric } from './plugin-aliyun-monitor-polardb-metric.entity';
import { PluginAliyunRedis } from './plugin-aliyun-redis.entity';
import { PluginAliyunRedisController } from './plugin-aliyun-redis.controller';
import { PluginAliyunMonitorRedisMetric } from './plugin-aliyun-monitor-redis-metric.entity';
import { PluginAliyunRocketmq } from './plugin-aliyun-rocketmq.entity';
import { PluginAliyunMonitorRocketmqMetric } from './plugin-aliyun-monitor-rocketmq-metric.entity';
import { PluginAliyunRocketmqController } from './plugin-aliyun-rocketmq.controller';
import { PluginAliyunMonitorEcsMetric } from './plugin-aliyun-monitor-ecs-metric.entity';

@Module({
  imports: [
    TypeOrmModule.forFeature(
      [
        Server,
        PluginAliyunMonitorEcsMetric,
        PluginAliyunMonitorSLB_QPS,

        // 阿里云配置
        PluginAliyunSetting,
        // 阿里云SLB
        PluginAliyunSLB,
        // 阿里云Polardb
        PluginAliyunPolardb,
        PluginAliyunMonitorPolardbMetric,
        // 阿里云Redis
        PluginAliyunRedis,
        PluginAliyunMonitorRedisMetric,
        // 阿里云Rocketmq
        PluginAliyunRocketmq,
        PluginAliyunMonitorRocketmqMetric,
      ],
    ),
    HttpModule,
  ],
  providers: [PluginAliyunMonitorTaskService],
  controllers: [
    PluginAliyunMonitorController,
    PluginAliyunPolardbController,
    PluginAliyunSettingController,
    PluginAliyunRedisController,
    PluginAliyunRocketmqController
  ],
})
export class PluginAliyunMonitorModule {

}